using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Data.SqlClient;
using System.Data;

namespace Acms.SqlDal
{
    public class PostUploadSummaryDal : PostDal
    {
        public new enum Fields
        {
            Total,
            Reviewed,
            Reported,
            Suspended
        }

        protected override void ReadRecord(Hashtable table, SqlDataReader reader)
        {
            base.ReadRecord(table, reader);
            GetReaderValue<int>(Fields.Total, reader, table);
            GetReaderValue<int>(Fields.Reviewed, reader, table);
            GetReaderValue<int>(Fields.Reported, reader, table);
            GetReaderValue<int>(Fields.Suspended, reader, table);
        }

        public Hashtable[] GetAllBySiteId(int siteId)
        {
            SqlCommand cmd = CreateCommand("GetAllBySiteId");
            AddInputParameter(cmd, "SiteId", siteId, SqlDbType.Int);
            return base.ExecuteGetCollection(cmd);
        }
    }
}
